package org.lgiavedoni.android.franq.command.system;

import org.apache.commons.cli.CommandLine;
import org.lgiavedoni.android.franq.core.command.Command;
import org.lgiavedoni.android.franq.core.command.CommandManager;
import org.lgiavedoni.android.franq.service.communication.CommunicationService;
import org.lgiavedoni.android.franq.util.collection.CollectionUtils;

public class HelpCommand extends Command {

	@Override
	public boolean execute(CommandLine cmd) throws Exception {
		CommunicationService.inst.sendDefaultTextMessage(CollectionUtils.toString(CommandManager.inst.getAllCommandKeys(), "\n"));
		return true;
	}

	@Override
	public String getCommandText() {
		return "help";
	}
}